package com.jsb.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.jsb.mapper.QuestionUserMapper;
import com.jsb.model.QuestionUser;
import com.jsb.model.QuestionUserExample;

@Service
public class QuestionUserService{
	
	@Resource
	private QuestionUserMapper questionUserMapper;
	
	public void addQuestionUser(QuestionUser questionUser) {
		questionUserMapper.insertSelective(questionUser);
	}
	//没有此方法
//	public void delQuestionUserByQuestionUuid(String questionUuid) {
//		questionUserMapper.deleteByPrimaryKey(questionUuid);
//	}
	
//	public void updateQuestionUser(QuestionUser questionUser) {
//		questionUserMapper.updateByPrimaryKeySelective(questionUser);
//	}
	
	public void updateQuestionUserByExample(QuestionUser questionUser,QuestionUserExample questionUserExample){
	    questionUserMapper.updateByExampleSelective(questionUser,questionUserExample);
	}
	
//	public QuestionUser getQuestionUserByQuestionUuid(String questionUuid) {
//		return questionUserMapper.selectByPrimaryKey(questionUuid);
//	}
	
	public List<QuestionUser> getPageQuestionUser(QuestionUserExample questionUserExample) {
		return questionUserMapper.selectPage(questionUserExample);
	}
	
	public int countQuestionUser(QuestionUserExample questionUserExample) {
		return questionUserMapper.countByExample(questionUserExample);
	}
	
	public List<QuestionUser> selectByExample(QuestionUserExample example){
	    return questionUserMapper.selectByExample(example);
	}
}
